<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/base">
<head>
	<title>渠道商管理</title>
	<script type="text/javascript" th:src="@{/assets/js/plugins/pickers/daterangepicker.js}"></script>
</head>

<body>

	<!-- Page header -->
	<div class="page-header" layout:fragment="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold" th:text="#{web.name}">管理系统</span> - 渠道商管理</h4>
			</div>
		</div>
	</div>
	<!-- /page header -->


	<!-- Main content -->
	<div class="content-wrapper" layout:fragment="content">

		<!-- Table -->
		<div class="panel panel-flat min-panel">
			<div class="panel-heading">
				<h5 class="panel-title text-primary"><i class="icon-twitter" />渠道商列表</h5>
        	</div>

        	<div class="panel-body">
        			<form id="query" action="#" class="form-horizontal">
						<div class="row">
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-3 control-label">名称:</label>
									<div class="col-lg-9">
										<input type="text" name="name" class="form-control" placeholder="名称 模糊查询" />
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 control-label">电话号码:</label>
									<div class="col-lg-8">
										<input type="text" name="phoneNo" class="form-control" placeholder="电话号码 模糊查询" />
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<input type="hidden" name="view" th:value="${view}"></input>	
									<input type="hidden" name="type" th:value="${type}"></input>
									<input type="hidden" name="auditStatus" th:value="${auditStatus}"></input>
									<button type="button" id="submit" class="btn btn-primary">查询 <i class="icon-search position-right"></i></button>
									<button type="button" class="btn btn-primary btn-add">新增<i class="icon-user-plus position-right"></i></button>
								</div>
							</div>
						</div>
        			</form>
				<table class="table datatable-basic table-striped table-hover">
					<thead>
						<tr class="bg-primary">
							<th>渠道商名称</th>
							<th>客户人数</th>
							<th>电话号码</th>
							<th>总K值</th>
							<th>已结算K值</th>
							<th>待计算K值</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody class="border-dashed">
						
					</tbody>
				</table>
			</div>
		</div>
		
		<div id="edit_dialog" class="modal fade in">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">×</button>
						<h5 class="modal-title text-primary">编辑渠道商</h5>
					</div>

					<form action="#" id="edit">
						<div class="modal-body">
							 <div class="form-group">
									<label>推荐渠道商</label>	
									<select name="recommendDistributorId" class="select form-control input-xs">
										<option value="-1" >推荐选择渠道商</option>
										<option th:each="dis : ${distributorList}" th:value="${dis.id}" th:text="${dis.name}"></option>
									</select>
						    </div>
						
							<div class="form-group">
								<label>经营者姓名<span class="text-danger">*</span></label>
								<input name="name" type="text" placeholder="名称" class="form-control" required="true" maxlength="50"/>
							</div>
							
							<div class="form-group">
								<label>身份证号码<span class="text-danger">*</span></label>	
								<input name="idCardNo" type="text" placeholder="身份证号码" class="form-control"  required="true" maxlength="18"/>
							</div>
							
							<div class="form-group">
								<label>代理商编号<span class="text-danger">*</span></label>	
								<input name="code" type="text" placeholder="代理商编号" class="form-control"  required="true"/>
							</div>
							
							<div class="form-group">
								<label>店铺名称<span class="text-danger">*</span></label>
								<input name="shopName" type="text" placeholder="店铺名称" class="form-control" required="true" maxlength="50"/>
							</div>
							
							<div class="form-group">
								<label>店铺面积</label>
								<input name="shopArea" type="text" placeholder="店铺面积" class="form-control" maxlength="50"/>
							</div>
							
							<div class="form-group">
								<label>店铺员工</label>
								<input name="shopStaff" type="text" placeholder="店铺员工" class="form-control" maxlength="50"/>
							</div>
							
							<div class="form-group">
								<label>合作方式<span class="text-danger">*</span></label>
								<input name="cooperationType" type="text" placeholder="合作方式" class="form-control" required="true" maxlength="50"/>
							</div>
							
							<div class="form-group">
								<label>来源<span class="text-danger">*</span></label>	
								<select name="source" class="select form-control input-xs">
									<option th:value="-1" th:text="请选择来源"></option>
									<option th:each="source : ${sourceList}" th:value="${source.code}" th:text="${source.name}"></option>
								</select>
							</div>
							
							<div class="form-group">
								<label>签约登记时间<span class="text-danger">*</span></label>	
								<input type="text" id="registerTime" readonly="readonly" name="registerTime" class="form-control" required="true" placeholder="签约登记时间" />
							</div>
							
							<div class="form-group">
								<label>合作开始时间<span class="text-danger">*</span></label>	
								<input type="text" id="cooperationStartTime" readonly="readonly" name="cooperationStartTime" class="form-control" required="true" placeholder="合作开始时间" />
							</div>
							
							<div class="form-group">
								<label>合作结束时间<span class="text-danger">*</span></label>	
								<input type="text" id="cooperationEndTime" readonly="readonly" name="cooperationEndTime" class="form-control" required="true" placeholder="合作结束时间" />
							</div>
							
							<div class="form-group">
								<label>性别<span class="text-danger">*</span></label>	
								<select name="sex" class="select form-control input-xs">
									<option th:value="-1" th:text="请选择性别"></option>
									<option th:each="sex : ${sexList}" th:value="${sex.code}" th:text="${sex.name}"></option>
								</select>
							</div>

							<div class="form-group">
									<label>权益<span class="text-danger">*</span></label>	
									<select name="levelId" class="select form-control input-xs">
										<option th:value="-1" th:text="请选择权益"></option>
										<option th:each="distributorLevel : ${levels}" th:value="${distributorLevel.id}" th:text="${distributorLevel.levelName}"></option>
									</select>
						    </div>
						    
						    <!-- <div class="form-group">
									<label>服务老师<span class="text-danger">*</span></label>	
									<select name="servantId" class="select form-control input-xs">
										<option th:value="-1" th:text="请选择服务老师"></option>
										<option th:each="servant : ${servants}" th:value="${servant.id}" th:text="${servant.name}"></option>
									</select>
						    </div> -->

							<div class="form-group">
								<label>电话号码<span class="text-danger">*</span></label>	
								<input id="phoneNo" name="phoneNo" type="text" placeholder="电话号码" class="form-control" number="true" maxlength="100"/>
							</div>
							
							<div class="form-group">
								<label>固定号码</label>	
								<input name="telephoneNo" type="text" placeholder="电话号码" class="form-control" number="true" maxlength="100"/>
							</div>
							
							<!-- <div class="form-group">
									<label>省</label>	
									<select onchange="selectedProvince(this)" id="provinceId" name="provinceId" class="select form-control input-xs">
										<option th:each="province : ${provinces}" th:value="${province.provinceId}" th:text="${province.province}"></option>
									</select>
						    </div>
						    
						    <div class="form-group">
									<label>市</label>	
									<select onchange="selectedCity(this)" id="cityId" name="cityId" class="select form-control input-xs">
									</select>
						    </div>
						    
						     <div class="form-group">
									<label>区域</label>	
									<select onchange="selectedArea(this)" id="areaId" name="areaId" class="select form-control input-xs">
									</select>
						    </div> -->

							<div class="form-group">
								<label>具体经营地址</label>	
								<input name="address" type="text" placeholder="地址" class="form-control" maxlength="200"/>
							</div>
							
							<div class="form-group">
								<label>其他情况说明</label>	
								<textarea name="remark" rows="3" cols="20" placeholder="其他情况说明" class="form-control"></textarea>
							</div>
							
							<input name="id" type="hidden" />
							<input id="type" name="type" type="hidden" value="1"/>
							<input id="auditStatus" name="auditStatus" type="hidden" value="0"/>
							
							<input name="recommendDistributorId" type="hidden" />
							<input name="oauth_id" type="hidden" />
							<input name="province" type="hidden" />
							<input name="city" type="hidden" />
							<input name="area" type="hidden" />
						</div>
							
						<div class="modal-footer">
							<button type="button" class="btn btn-link" data-dismiss="modal">关闭</button>
							<button type="button" id="submitEdit" class="btn btn-primary" >保存</button>
						</div>
					</form>
				</div>
			</div>
		</div>
		
		<div id="audit_dialog" class="modal fade in">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">×</button>
						<h5 class="modal-title text-primary">审核渠道商</h5>
					</div>

					<form action="#" id="audit">
						<div class="modal-body">
							<div class="form-group">
								<label>审核结果<span class="text-danger">*</span></label>
								<select name="auditStatusResult" class="select form-control input-xs">
									<option value="1" >通过</option>
									<option value="2" >拒绝</option>
								</select>
							</div>

							<input name="id" id="id" type="hidden" />
						</div>
							
						<div class="modal-footer">
							<button type="button" class="btn btn-link" data-dismiss="modal">关闭</button>
							<button type="button" id="submitAudit" class="btn btn-primary" >保存</button>
						</div>
					</form>
				</div>
			</div>
		</div>
		
		<script type="text/templete" id="btnGroup">
			<div class="btn-group" data-toggle="buttons">
				<button type="button" class="btn btn-link text-primary btn-edit" title="编辑">编辑</button>
				<button type="button" class="btn btn-link text-danger btn-del" title="删除">删除</button>
			</div>
		</script>
		
		<!-- /table -->
		<script type="text/javascript" th:src="@{/oss/js/distributor.js}"></script>
	</div>
	<!-- /main content -->

</body>
</html>
